#ifndef  __APP_DSTIN_H__
#define  __APP_DSTIN_H__

#ifdef   APP_GLOBALS_DSTIN
#define  APP_EXT_DSTIN
#else
#define  APP_EXT_DSTIN  extern
#endif

#define DstInputTimingFreq            20      /* 20HZ-50ms */

/* DstInputs OS_Flags config bits */
#define OSDSTINFlags_TimEXCV2_HLIMIT                ((OS_FLAGS)DEF_BIT_00) 
#define OSDSTINFlags_TimEXCV2_LLIMIT                ((OS_FLAGS)DEF_BIT_01) 
#define OSDSTINFlags_TimBVOL_HLIMIT                 ((OS_FLAGS)DEF_BIT_02) 
#define OSDSTINFlags_TimBVOL_LLIMIT                 ((OS_FLAGS)DEF_BIT_03) 
#define OSDSTINFlags_TimEXCV_HLIMIT                 ((OS_FLAGS)DEF_BIT_04) 
#define OSDSTINFlags_TimEXCV_LLIMIT                 ((OS_FLAGS)DEF_BIT_05) 
#define OSDSTINFlags_TimEXCI_HLIMIT                 ((OS_FLAGS)DEF_BIT_06) 
#define OSDSTINFlags_TimEXCI_LLIMIT                 ((OS_FLAGS)DEF_BIT_07) 
#define OSDSTINFlags_TimEXCI2_HLIMIT                ((OS_FLAGS)DEF_BIT_08) 
#define OSDSTINFlags_TimEXCI2_LLIMIT                ((OS_FLAGS)DEF_BIT_09) 
#define OSDSTINFlags_TimAUX_IN1                     ((OS_FLAGS)DEF_BIT_10) 

#define OSDSTINFlags_DSTINTIMING                    (OSDSTINFlags_TimEXCV2_HLIMIT | \
                                                     OSDSTINFlags_TimEXCV2_LLIMIT | \
                                                     OSDSTINFlags_TimBVOL_HLIMIT  | \
                                                     OSDSTINFlags_TimBVOL_LLIMIT  | \
                                                     OSDSTINFlags_TimEXCV_HLIMIT  | \
                                                     OSDSTINFlags_TimEXCV_LLIMIT  | \
                                                     OSDSTINFlags_TimEXCI_HLIMIT  | \
                                                     OSDSTINFlags_TimEXCI_LLIMIT  | \
                                                     OSDSTINFlags_TimEXCI2_HLIMIT | \
                                                     OSDSTINFlags_TimEXCI2_LLIMIT | \
                                                     OSDSTINFlags_TimAUX_IN1      )
#define OSDSTINFlags_DSTINALL                       OSDSTINFlags_DSTINTIMING
#define OSDSTINFlags_ALL                            OSDSTINFlags_DSTINALL

/* Bit order is same with "DstInputsOrd" */
APP_EXT_DSTIN uint16_t DigitalInputsRawCloseSta;      /* 0:Open; 1:Close */

APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCV2_HLIMIT;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCV2_LLIMIT;
APP_EXT_DSTIN uint16_t DigitalScanTiC_BVOL_HLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_BVOL_LLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCV_HLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCV_LLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCI_HLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCI_LLIMIT ;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCI2_HLIMIT;
APP_EXT_DSTIN uint16_t DigitalScanTiC_EXCI2_LLIMIT;
APP_EXT_DSTIN uint16_t DigitalScanTiC_AUX_IN1     ;

#endif